-
Notifications
You must be signed in to change notification settings - Fork 663
feat(xml/unstable): add XML parsing and serialization module #6942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
could we get some benchmarks comparing to other parsers? |
Yes, that's a good idea. I'll look into it. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6942 +/- ##
==========================================
+ Coverage 94.28% 94.55% +0.26%
==========================================
Files 584 593 +9
Lines 43186 44968 +1782
Branches 6933 7390 +457
==========================================
+ Hits 40720 42519 +1799
+ Misses 2413 2397 -16
+ Partials 53 52 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Updated the description now. Let me know if you would like to benchmark against a specific package |
7f792e6 to
e20f201
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I have no idea why this formatting is happening 😅
|
Ref: denoland/deno#24995 |
Thanks, I was not aware of this discussion. Perhaps we could have it as an unstable module for now? Then we can always kick it out, should the core team decide to implement |
|
Updated again to increase streaming performance and get test coverage to 100% |
New XML parsing and serialization module
What @std/xml has:
What @std/xml doesn't Have:
Benchmark Results
My personal use case is a 600MB file of product data in a Google Shopping/Merchant XML format. I use Sax for this, since it can stream. Therefore, I picked Sax and fast-xml-parser (widely used for non-streaming) as the reference cases. Please leave a comment if you would like to see a comparison to another package.
I ran these benchmarks a few hundred times (except the big streaming test that I ran about 15-20 times). All on a MacBook M1 Max. The test files are located in
testdata(not the 600MB one naturally)Small Files (<10KB)
Large Files (large.xml - 300KB)
Streaming (597MB file)